 import java.io.*;
  class SerializationDemo{
	 
	//private String name;
	//private String address;
	//private int SSN;
	//private int number;

	public static void main(String[] args) {
		Employee e = new Employee();
		e.name = "Jack Sparrow";
		e.address = " Felight, Bangalore";
		e.SSN= 111222;
		e.number = 101;
		try {
			FileOutputStream fileOut = new FileOutputStream("employee.ser");
			ObjectOutputStream out = new ObjectOutputStream(fileOut);
			out.writeObject(e);
			out.close();
			fileOut.close();
		}
		catch(IOException i) {
			i.printStackTrace();
		}
		System.out.println("Serialization is dne");
	}
} 

 
 
 